]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
st/icon-theme: Remove unnecessary CLAMP()
authorFlorian Müllner <fmuellner@gnome.org>
Fri, 3 Feb 2023 14:52:46 +0000 (15:52 +0100)
committerMarge Bot <marge-bot@gnome.org>
Sun, 19 Mar 2023 11:51:01 +0000 (11:51 +0000)
The ClutterColor struct members are 8-bit unsigned integers, so
they are always in the 0 to 255 range.

Spotted by coverity.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2679>

src/st/st-icon-theme.c

index a7cbd0da8259cb621b364a246144fdcd5fcc2ebc..dc3f8cedc9cce45d95acf82e2a84878e4dc17aa4 100644 (file)
@@ -3659,9 +3659,9 @@ static char *
 color_to_string_noalpha (const ClutterColor *color)
 {
   return g_strdup_printf ("rgb(%d,%d,%d)",
-                          CLAMP (color->red, 0, 255),
-                          CLAMP (color->green, 0, 255),
-                          CLAMP (color->blue, 0, 255));
+                          color->red,
+                          color->green,
+                          color->blue);
 }
 
 static void